#include <iostream>
#include <vector>
#include <string>

size_t split(const std::string& str,const std::string& seq,std::vector<std::string>* arry)
{
    size_t index=0;
    size_t pos=0;
    while(index<str.size())
    {
        pos=str.find(seq,index);
        if(pos==std::string::npos)
        {
            arry->push_back(str.substr(index));
            break;
        }
        if(index==pos)
        {
            index=pos+seq.size();
            continue;
        }
        arry->push_back(str.substr(index,pos-index));
        index=pos+seq.size();
    }
    return arry->size();
}

int main()
{
    std::vector<std::string> arry;
    split("....new.music.hello.....",".",&arry);
    for(auto& s:arry) std::cout<<s<<std::endl;
    return 0;
}